<?xml version="1.0" encoding="ISO-8859-1" ?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
	  xmlns:a4j="http://richfaces.org/a4j">

	<f:subview id="subviewPopupAcompanhate">
	
		<rich:modalPanel id="popupAcompanhante" autosized="true" headerClass="height:20px;">
		
			<f:facet name="header">
				<h:outputText value="#{bundle.acompanhante_titulo_consultar}" />
			</f:facet>
			
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/images/close.gif" styleClass="botao_fechar_popup" id="hideLink">
						<rich:componentControl for="popupAcompanhante" attachTo="hideLink" operation="hide" event="onclick" />
					</h:graphicImage>
				</h:panelGroup>
			</f:facet>
			
				<rich:messages id="msgAcompanhanteConsulta"></rich:messages>
				
			<a4j:form>
				
				<h:commandButton action="#{acompanhanteBackBean.obterListaAcompanhante}" value="#{bundle.acompanhante_btn_consultar}" />
						
				<div class="linha"/>
				
				<rich:datascroller for="gridacompanhante" maxPages="10"/>
				
					<rich:dataTable value="#{acompanhanteBackBean.acompanhanteFormBean.listaAcompanhante}" var="acompanhante" id="gridacompanhante" rows="10" align="center" width="100%">
				
					<rich:column filterBy="#{acompanhante.codigo}">
						<f:facet name="header">
							<h:outputText value="#{bundle.acompanhante_codigo}"/>
						</f:facet>
						<h:outputText value="#{acompanhante.codigo}"/>
					</rich:column>
					
					<rich:column filterBy="#{acompanhante.nome}">
						<f:facet name="header">
							<h:outputText value="Nome"/>
						</f:facet>
						<h:outputText value="#{acompanhante.nome}"/>
					</rich:column>
					
					<rich:column filterBy="#{acompanhante.rg}">
						<f:facet name="header">
							<h:outputText value="#{bundle.acompanhante_rg}"/>
						</f:facet>
						<h:outputText value="#{acompanhante.rg}"/>
					</rich:column>
					
					<rich:column>
						<a4j:commandButton id="btnEditar" actionListener="#{acompanhanteBackBean.listenerIrEditaracompanhante}" value="#{bundle.acompanhante_btn_editar}" reRender="formacompanhanteManter">
							<f:param id="codigoacompanhanteEditar" name="codigoacompanhanteEditar" value="#{acompanhante.codigo}" />
							<rich:componentControl for="manteracompanhante" attachTo="btnEditar" operation="show" event="onclick" />
						</a4j:commandButton>
					</rich:column>
					
					<rich:column>
						<a4j:commandButton id="btnExcluir" actionListener="#{acompanhanteBackBean.listenerIrExcluiracompanhante}" value="#{bundle.acompanhante_btn_excluir}" reRender="formacompanhanteManter">
							<f:param id="codigoacompanhanteExcluir" name="codigoacompanhanteExcluir" value="#{acompanhante.codigo}" />
							<rich:componentControl for="manteracompanhante" attachTo="btnExcluir" operation="show" event="onclick" />
						</a4j:commandButton>
					</rich:column>
					
				</rich:dataTable>
				
				<div class="linha"/>
				
				<a4j:commandButton value="#{bundle.acompanhante_btn_novo}" actionListener="#{acompanhanteBackBean.listenerIrInseriracompanhante}" id="btnNovo" reRender="formacompanhanteManter">
					<rich:componentControl for="manteracompanhante" attachTo="btnNovo" operation="show" event="onclick" />
				</a4j:commandButton>
				
			</a4j:form>

		</rich:modalPanel>
		
	</f:subview>
	
	<ui:include src="/pages/acompanhante/manterAcompanhante.xhtml" />
	
</html>